const Koa = require('koa');
const bodyParser = require('koa-bodyparser');
const Router = require('@koa/router');
const userRouter = require('./routes/user')
const jingdianRouter = require('./routes/jingdian')

const app = new Koa();
const mout=require('koa-mount');
const path = require('path');
app.use(bodyParser());
app.use(mout('/static',serve(path.join(__dirname,'./static'))))

router.use(userRouter.routes())
router.use(jingdianRouter.routes())
console.log(path.join(__dirname,'./static'))
const router = new Router();
router.use(userRouter.routes())//
router.use(jindianRouter.routes())
app.use(router.routes());
app.use(router.allowedMethods());

app.listen(3000)